package com.service.mybatis.pojo;

import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;

/**
 * 公共父类 只带id
 * @author ccf
 * @Date 2022/3/14 20:19
 */
@Setter
@Getter
@NoArgsConstructor
public class IdEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    public static final String ID_FIELD = "id";

    /**
     * 主键ID
     */
    @TableId
    private String id;

    protected IdEntity(String id) {
        this.id = id;
    }

    public Serializable pkVal() {
        return this.id;
    }
}
